package com.huwei.activemq.config;

import org.apache.activemq.command.ActiveMQQueue;
import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.jms.Queue;
import javax.jms.Topic;

/**
 * @Author: 胡伟
 * @Date: 2021/1/13 18:16
 * @Description:
 */
@Configuration
public class ActiveMQQueueConfig {
    @Bean(name = "huwei_queue")
    public Queue getHuweiQueue() {
        return new ActiveMQQueue("huwei_queue");
    }

    @Bean(name = "jiahong_queue")
    public Queue getJiaHongQueue() {
        return new ActiveMQQueue("jiahong_queue");
    }

    @Bean(name = "huwei_topic")
    public Topic getHuweiTopic() {
        return new ActiveMQTopic("huwei_topic");
    }

}
